<template>
	<view class="box fu" :style="{height:screenHeight+'px'}">
		<view class="zz">
			<textarea placeholder="请输入留言..." v-model="value"></textarea>
		</view>
		<button class="dibu cc" @click="add">提交</button>
	</view>
</template>

<script>
	import {
		addfeedback
	} from '@/common/http.api.js';
	export default {
		data() {
			return {
				screenHeight: "",
				value: ''
			}
		},
		onLoad() {
			this.screenHeight = uni.getSystemInfoSync().windowHeight;
		},
		methods: {
			add() {
				let arr = {
					content: this.value
				}
				addfeedback(arr).then(res => {
					if(res.code == 200){
						uni.showToast({
							title: '提交成功',
							duration: 2000,
							mask: false,
							icon: "none"
						})
						setTimeout(()=>{
							uni.navigateBack()
						},500)
					}
					
				})
			}
		}
	}
</script>

<style lang="scss">
	.dibu {
		position: absolute;
		bottom: 50rpx;
	}

	.fu {
		position: relative;
	}

	.liebinu {
		font-size: 26rpx;
	}

	.cc {
		width: 677rpx;
		height: 80rpx;
		background: linear-gradient(84deg, #24180D 0%, #594629 100%);
		border-radius: 40rpx;
		font-family: Source Han Sans CN;
		font-weight: 400;
		font-size: 28rpx;
		color: #FFFFFF;
		line-height: 33rpx;
		display: flex;
		justify-content: center;
		align-items: center;
	}

	.zz {
		width: 650rpx;
		background: #FFFFFF;
		border-radius: 20rpx;
		padding: 20rpx;



		.xx {
			display: flex;
			align-items: center;
			border-bottom: 1px solid #EEEEEE;
			height: 100rpx;

			span {
				width: 150rpx;
				font-family: PingFang SC;
				font-weight: 500;
				font-size: 30rpx;
				color: #0A0A0A;
				line-height: 36rpx;
			}
		}
	}
</style>